3.157 \(\int x (a+b \log (c x^n)) (d+e \log (f x^r)) \, dx\)

Optimal. Leaf size=84 \[ \frac{1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )-\frac{1}{8} e r x^2 \left (2 a+2 b \log \left (c x^n\right )-b n\right )-\frac{1}{4} b n x^2 \left (d+e \log \left (f x^r\right )\right )+\frac{1}{8} b e n r x^2 \]

[Out]

(b*e*n*r*x^2)/8 - (e*r*x^2*(2*a - b*n + 2*b*Log[c*x^n]))/8 - (b*n*x^2*(d + e*Log[f*x^r]))/4 + (x^2*(a + b*Log[
c*x^n])*(d + e*Log[f*x^r]))/2

________________________________________________________________________________________

Rubi [A]  time = 0.0518652, antiderivative size = 84, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136, Rules used = {2304, 2366, 12} \[ \frac{1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )-\frac{1}{8} e r x^2 \left (2 a+2 b \log \left (c x^n\right )-b n\right )-\frac{1}{4} b n x^2 \left (d+e \log \left (f x^r\right )\right )+\frac{1}{8} b e n r x^2 \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*Log[c*x^n])*(d + e*Log[f*x^r]),x]

[Out]

(b*e*n*r*x^2)/8 - (e*r*x^2*(2*a - b*n + 2*b*Log[c*x^n]))/8 - (b*n*x^2*(d + e*Log[f*x^r]))/4 + (x^2*(a + b*Log[
c*x^n])*(d + e*Log[f*x^r]))/2

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2366

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rubi steps

\begin{align*} \int x \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right ) \, dx &=-\frac{1}{4} b n x^2 \left (d+e \log \left (f x^r\right )\right )+\frac{1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )-(e r) \int \frac{1}{4} x \left (2 a \left (1-\frac{b n}{2 a}\right )+2 b \log \left (c x^n\right )\right ) \, dx\\ &=-\frac{1}{4} b n x^2 \left (d+e \log \left (f x^r\right )\right )+\frac{1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )-\frac{1}{4} (e r) \int x \left (2 a \left (1-\frac{b n}{2 a}\right )+2 b \log \left (c x^n\right )\right ) \, dx\\ &=\frac{1}{8} b e n r x^2-\frac{1}{8} e r x^2 \left (2 a-b n+2 b \log \left (c x^n\right )\right )-\frac{1}{4} b n x^2 \left (d+e \log \left (f x^r\right )\right )+\frac{1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.0622799, size = 68, normalized size = 0.81 \[ \frac{1}{4} x^2 \left (e (2 a-b n) \log \left (f x^r\right )+2 a d-a e r+b \log \left (c x^n\right ) \left (2 d+2 e \log \left (f x^r\right )-e r\right )-b d n+b e n r\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*Log[c*x^n])*(d + e*Log[f*x^r]),x]

[Out]

(x^2*(2*a*d - b*d*n - a*e*r + b*e*n*r + e*(2*a - b*n)*Log[f*x^r] + b*Log[c*x^n]*(2*d - e*r + 2*e*Log[f*x^r])))
/4

________________________________________________________________________________________

Maple [C]  time = 0.18, size = 1640, normalized size = 19.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*ln(c*x^n))*(d+e*ln(f*x^r)),x)

[Out]

-1/4*I*Pi*b*d*x^2*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+1/4*I*ln(c)*Pi*b*e*x^2*csgn(I*f)*csgn(I*f*x^r)^2+1/4*I*l
n(c)*Pi*b*e*x^2*csgn(I*x^r)*csgn(I*f*x^r)^2+1/8*I*Pi*b*e*n*x^2*csgn(I*f*x^r)^3+1/4*b*e*n*r*x^2-1/4*b*e*r*x^2*l
n(x^n)-1/4*I*ln(c)*Pi*b*e*x^2*csgn(I*f)*csgn(I*x^r)*csgn(I*f*x^r)+1/2*ln(f)*b*e*x^2*ln(x^n)-1/4*I*Pi*b*d*x^2*c
sgn(I*c*x^n)^3-1/4*I*Pi*a*e*x^2*csgn(I*f*x^r)^3-1/8*Pi^2*b*e*x^2*csgn(I*c*x^n)^3*csgn(I*f*x^r)^3-1/8*I*Pi*b*e*
n*x^2*csgn(I*f)*csgn(I*f*x^r)^2-1/8*I*Pi*b*e*n*x^2*csgn(I*x^r)*csgn(I*f*x^r)^2-1/8*I*Pi*b*e*r*x^2*csgn(I*c)*cs
gn(I*c*x^n)^2-1/8*I*Pi*b*e*r*x^2*csgn(I*x^n)*csgn(I*c*x^n)^2-1/8*Pi^2*b*e*x^2*csgn(I*c)*csgn(I*c*x^n)^2*csgn(I
*f)*csgn(I*f*x^r)^2-1/8*Pi^2*b*e*x^2*csgn(I*c)*csgn(I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*x^r)*csgn(I*f*x^r)-1/8*Pi^2*b*e*x^2*csgn(I*c)*csgn(I*x^n)*csg
n(I*c*x^n)*csgn(I*f)*csgn(I*x^r)*csgn(I*f*x^r)

________________________________________________________________________________________

Maxima [A]  time = 1.18, size = 138, normalized size = 1.64 \begin{align*} -\frac{1}{4} \, b d n x^{2} - \frac{1}{4} \, a e r x^{2} + \frac{1}{2} \, b d x^{2} \log \left (c x^{n}\right ) + \frac{1}{2} \, a e x^{2} \log \left (f x^{r}\right ) + \frac{1}{4} \,{\left ({\left (r - \log \left (f\right )\right )} x^{2} - x^{2} \log \left (x^{r}\right )\right )} b e n + \frac{1}{2} \, a d x^{2} - \frac{1}{4} \,{\left (r x^{2} - 2 \, x^{2} \log \left (f x^{r}\right )\right )} b e \log \left (c x^{n}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))*(d+e*log(f*x^r)),x, algorithm="maxima")

[Out]

-1/4*b*d*n*x^2 - 1/4*a*e*r*x^2 + 1/2*b*d*x^2*log(c*x^n) + 1/2*a*e*x^2*log(f*x^r) + 1/4*((r - log(f))*x^2 - x^2
*log(x^r))*b*e*n + 1/2*a*d*x^2 - 1/4*(r*x^2 - 2*x^2*log(f*x^r))*b*e*log(c*x^n)

________________________________________________________________________________________

Fricas [A]  time = 0.801929, size = 324, normalized size = 3.86 \begin{align*} \frac{1}{2} \, b e n r x^{2} \log \left (x\right )^{2} - \frac{1}{4} \,{\left (b e r - 2 \, b d\right )} x^{2} \log \left (c\right ) - \frac{1}{4} \,{\left (b d n - 2 \, a d -{\left (b e n - a e\right )} r\right )} x^{2} + \frac{1}{4} \,{\left (2 \, b e x^{2} \log \left (c\right ) -{\left (b e n - 2 \, a e\right )} x^{2}\right )} \log \left (f\right ) + \frac{1}{2} \,{\left (b e r x^{2} \log \left (c\right ) + b e n x^{2} \log \left (f\right ) +{\left (b d n -{\left (b e n - a e\right )} r\right )} x^{2}\right )} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))*(d+e*log(f*x^r)),x, algorithm="fricas")

[Out]

1/2*b*e*n*r*x^2*log(x)^2 - 1/4*(b*e*r - 2*b*d)*x^2*log(c) - 1/4*(b*d*n - 2*a*d - (b*e*n - a*e)*r)*x^2 + 1/4*(2
*b*e*x^2*log(c) - (b*e*n - 2*a*e)*x^2)*log(f) + 1/2*(b*e*r*x^2*log(c) + b*e*n*x^2*log(f) + (b*d*n - (b*e*n - a
*e)*r)*x^2)*log(x)

________________________________________________________________________________________

Sympy [B]  time = 12.2933, size = 199, normalized size = 2.37 \begin{align*} \frac{a d x^{2}}{2} + \frac{a e r x^{2} \log{\left (x \right )}}{2} - \frac{a e r x^{2}}{4} + \frac{a e x^{2} \log{\left (f \right )}}{2} + \frac{b d n x^{2} \log{\left (x \right )}}{2} - \frac{b d n x^{2}}{4} + \frac{b d x^{2} \log{\left (c \right )}}{2} + \frac{b e n r x^{2} \log{\left (x \right )}^{2}}{2} - \frac{b e n r x^{2} \log{\left (x \right )}}{2} + \frac{b e n r x^{2}}{4} + \frac{b e n x^{2} \log{\left (f \right )} \log{\left (x \right )}}{2} - \frac{b e n x^{2} \log{\left (f \right )}}{4} + \frac{b e r x^{2} \log{\left (c \right )} \log{\left (x \right )}}{2} - \frac{b e r x^{2} \log{\left (c \right )}}{4} + \frac{b e x^{2} \log{\left (c \right )} \log{\left (f \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*ln(c*x**n))*(d+e*ln(f*x**r)),x)

[Out]

a*d*x**2/2 + a*e*r*x**2*log(x)/2 - a*e*r*x**2/4 + a*e*x**2*log(f)/2 + b*d*n*x**2*log(x)/2 - b*d*n*x**2/4 + b*d
*x**2*log(c)/2 + b*e*n*r*x**2*log(x)**2/2 - b*e*n*r*x**2*log(x)/2 + b*e*n*r*x**2/4 + b*e*n*x**2*log(f)*log(x)/
2 - b*e*n*x**2*log(f)/4 + b*e*r*x**2*log(c)*log(x)/2 - b*e*r*x**2*log(c)/4 + b*e*x**2*log(c)*log(f)/2

________________________________________________________________________________________

Giac [B]  time = 1.40135, size = 217, normalized size = 2.58 \begin{align*} \frac{1}{2} \, b n r x^{2} e \log \left (x\right )^{2} - \frac{1}{2} \, b n r x^{2} e \log \left (x\right ) + \frac{1}{2} \, b r x^{2} e \log \left (c\right ) \log \left (x\right ) + \frac{1}{2} \, b n x^{2} e \log \left (f\right ) \log \left (x\right ) + \frac{1}{4} \, b n r x^{2} e - \frac{1}{4} \, b r x^{2} e \log \left (c\right ) - \frac{1}{4} \, b n x^{2} e \log \left (f\right ) + \frac{1}{2} \, b x^{2} e \log \left (c\right ) \log \left (f\right ) + \frac{1}{2} \, b d n x^{2} \log \left (x\right ) + \frac{1}{2} \, a r x^{2} e \log \left (x\right ) - \frac{1}{4} \, b d n x^{2} - \frac{1}{4} \, a r x^{2} e + \frac{1}{2} \, b d x^{2} \log \left (c\right ) + \frac{1}{2} \, a x^{2} e \log \left (f\right ) + \frac{1}{2} \, a d x^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))*(d+e*log(f*x^r)),x, algorithm="giac")

[Out]

1/2*b*n*r*x^2*e*log(x)^2 - 1/2*b*n*r*x^2*e*log(x) + 1/2*b*r*x^2*e*log(c)*log(x) + 1/2*b*n*x^2*e*log(f)*log(x)
+ 1/4*b*n*r*x^2*e - 1/4*b*r*x^2*e*log(c) - 1/4*b*n*x^2*e*log(f) + 1/2*b*x^2*e*log(c)*log(f) + 1/2*b*d*n*x^2*lo
g(x) + 1/2*a*r*x^2*e*log(x) - 1/4*b*d*n*x^2 - 1/4*a*r*x^2*e + 1/2*b*d*x^2*log(c) + 1/2*a*x^2*e*log(f) + 1/2*a*
d*x^2